// Author: Bjorn Schobben, Domien Nowicki


#ifndef RAY_H
#define RAY_H

#include "Vector.h"
#include "Scalar.h"
#include "World.h"

class Ray
{
public:
	enum SideHit
	{
		NORTH, EAST, SOUTH, WEST
	};

    Ray(const Vector& newEyepoint, const Vector& newDirection, const World& world);
    virtual ~Ray();

	const Vector& GetIntersection() const;
	const Scalar& GetDistance() const;
	enum SideHit GetSideHit() const;

	int GetMapIntersectionX() const;
	int GetMapIntersectionY() const;

protected:


private:
	void DdaAlgorithm(const World& world);

	Vector eyepoint;
	Vector direction;
	Vector intersection;
	Scalar distance;
	enum SideHit sideHit;
	int mapX, mapY;
};

#endif // RAY_H
